package com.bawei.module_car_space.http

import com.bawei.lib_net.NetModules
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import retrofit2.Retrofit
import javax.inject.Qualifier
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
object SpaceNetModel {

    @Provides
    @Singleton
    @CommonMainApi
    fun provideMainApi(@NetModules.CommonRetrofit retrofit: Retrofit) : SpaceApi {
        return retrofit.create(SpaceApi::class.java)
    }


    @Provides
    @Singleton
    @SingMainApi
    fun provideSignApi(@NetModules.SignRetrofit retrofit: Retrofit) : SpaceApi {
        return retrofit.create(SpaceApi::class.java)
    }

    @Qualifier
    @Retention(AnnotationRetention.RUNTIME)
    annotation class CommonMainApi

    @Qualifier
    @Retention(AnnotationRetention.RUNTIME)
    annotation class SingMainApi





}